#ifndef __GPS_LOCATION_MODEL_INCLUDE__
#define __GPS_LOCATION_MODEL_INCLUDE__
#include <QAbstractTableModel>
#include <QList>
#include "GPS_DFM_util.h"

class GPSLocationModel :public QAbstractTableModel {
	Q_OBJECT
public:
	GPSLocationModel(QObject *parent = 0);
	virtual ~GPSLocationModel();

public:
    void removeAllLocation();
	void appendLocation(QPointF point);
	void removeLastLocation();
	void removeLocation(int index);
	void setGPSLocationTextType(GPSLocationTextType type);
	QList<QPointF>	getLocationVector() const { return  locationVector; }
	GPSLocationTextType getCurrentDisplayType() const { return  cur_type; }
private:

	int rowCount(const QModelIndex &parent) const;
	int columnCount(const QModelIndex &parent) const;
	QVariant data(const QModelIndex &index, int role) const;
	QVariant headerData(int section, Qt::Orientation orientation, int role) const;
	Qt::ItemFlags flags(const QModelIndex &index)const;
	bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);


private:
	QList<QPointF>	locationVector;
	int locationDataRole;
	GPSLocationTextType cur_type;
};

#endif